package cho114366.basic;

public class J17_product implements J17_ProductService {

	// 1
	private J17_ProductVO[] pdata = new J17_ProductVO[100];

	private int pos = -1;

	@Override
	public boolean addProduct(J17_ProductVO p) {
		pdata[++pos] = p; // 2
		return true;
	}

	@Override
	public String readProduct() {
		String result = "";
		J17_ProductVO pvo;
		for (int i = 0; i <= pos; ++i) {
			pvo = pdata[i];
			result += pvo.toString() + "+\n";
		}// 3
		return result;
	}

}
